package models

type Job struct {
	ID       string `json:"id" gorm:"column:id;type:varchar(32);primaryKey;comment:'id'"`
	Name     string `json:"name" gorm:"column:name;type:varchar(32);index;comment:'任务名'"`
	Command  string `json:"command" gorm:"column:command;type:varchar(128);not null;comment:'执行的命令'"`
	CronExpr string `json:"cron_expr" gorm:"column:cron_expr;type:varchar(32);not null;comment:'定时任务表达式'"`
	CreateAt string `json:"create_at" gorm:"column:create_at;type:datetime;comment:'创建时间'"`
	UpdateAt string `json:"update_at" gorm:"column:update_at;type:datetime;comment:'修改时间'"`
	Status   int    `json:"status" gorm:"column:status;type:tinyint;comment:'状态0未知-1禁用1正常'"`
	IsDelete int    `json:"is_delete" gorm:"column:is_delete;type:tinyint;comment:'状态0未知1正常-1删除'"`
}

func (Job) TableName() string {
	return "job"
}
